# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-thumbnails-readme
pkgver=0.4.2
pkgrel=0
pkgdesc="Create thumbnails from Git folders"
url="https://github.com/firefly-cpp/thumbnails-readme"
arch="noarch"
license="BSD-3-Clause"
depends="python3 poppler-utils py3-cairosvg py3-pdf2image py3-pillow"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/firefly-cpp/thumbnails-readme/archive/$pkgver/thumbnails-readme-$pkgver.tar.gz"
builddir="$srcdir/thumbnails-readme-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/thumbnails_readme-$pkgver-py3-none-any.whl
}

sha512sums="
8261baf07b152457c92970a6ffb21b3b9f197d5b14cb0bf7bb99b95c4f0c1659baff756c0e25169fe7815cf5b9d06bcb3ec410df244b3bd5ccfd968ec2cb748f  thumbnails-readme-0.4.2.tar.gz
"
